Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add resource_profile support #52

Merged
merged 8 commits into from
Jun 11, 2024

Conversation

lu-wang-dl
Copy link
Contributor

Add extra param resource_profile and setup the resource profile if resource profile is supported.

test/test_backend.py Outdated Show resolved Hide resolved
@lu-wang-dl lu-wang-dl requested a review from WeichenXu123 May 24, 2024 06:49
joblibspark/utils.py Outdated Show resolved Hide resolved
test/test_backend.py Outdated Show resolved Hide resolved
@lu-wang-dl lu-wang-dl force-pushed the add-resource-group branch from 294254d to d646e94 Compare May 30, 2024 21:06
@lu-wang-dl lu-wang-dl requested a review from WeichenXu123 May 30, 2024 23:25
Comment on lines 168 to 171
with parallel_backend('spark',
num_cpus_per_spark_task=self.num_cpus_per_spark_task,
num_gpus_per_spark_task=self.num_gpus_per_spark_task) as (ba, _):
Parallel(n_jobs=5)(delayed(get_spark_context)(i) for i in range(10))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's test with num_gpus_per_spark_task different with default value, like:

Suggested change
with parallel_backend('spark',
num_cpus_per_spark_task=self.num_cpus_per_spark_task,
num_gpus_per_spark_task=self.num_gpus_per_spark_task) as (ba, _):
Parallel(n_jobs=5)(delayed(get_spark_context)(i) for i in range(10))
with parallel_backend('spark',
num_cpus_per_spark_task=2,
num_gpus_per_spark_task=2) as (ba, _):
Parallel(n_jobs=5)(delayed(get_spark_context)(i) for i in range(10))

test/test_spark.py Outdated Show resolved Hide resolved
test/test_spark.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@WeichenXu123 WeichenXu123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except a few minor comments!

@lu-wang-dl lu-wang-dl force-pushed the add-resource-group branch from 74cf97c to bceb7b5 Compare June 11, 2024 06:17
Copy link
Collaborator

@WeichenXu123 WeichenXu123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@WeichenXu123 WeichenXu123 merged commit 66ec069 into joblib:master Jun 11, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants